package com.luoran.car.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 车辆租赁表
 * @TableName CAR_RENTALS
 */
@TableName(value ="CAR_RENTALS")
@Data
@Document(indexName = "Vehicles")
public class CarRentals implements Serializable {
    /**
     * 租车订单主键
     */
    @TableId(type = IdType.AUTO)
    private Integer orderId;

    /**
     * 车辆外键
     */
    private Integer vehicleId;

    /**
     * 优惠券外键
     */
    private Integer couponId;

    /**
     * 租车天数
     */
    private Integer days;

    /**
     * 小计
     */
    private BigDecimal subtotal;

    /**
     * 备注
     */
    private String remark;

    /**
     * 租车开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date beginTime;

    /**
     * 租车结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endTime;

    /**
     * 租车逾期时间
     */
    private Date orderTime;

    /**
     * 保证金
     */
    private BigDecimal betMoney;

    /**
     * 损坏赔偿金
     */
    private BigDecimal bdMoney;

    /**
     * 客户id
     */
    private Integer userId;

    /**
     * 订单总价
     */
    private BigDecimal totalPrice;

    private String money;


    private String pay;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createTime;


    @TableField(exist = false)
    private  String uname;
    @TableField(exist = false)
    private  String phone;


    private  String status;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
